/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2022-08-03
 * Time: 19:23
 */

// 类要创建在 public class 外面
  class People {
    //类名大驼峰
    public String name;
    public int age;
    public float height;
    public float weight;
    public String tell;
    public String add;

    public void ability(int b) {
        if (age > 50) {
            System.out.println("能力较好");
        } else if (age > 30) {
            System.out.println("能力很好");
        } else {
            System.out.println("能力差");
        }
    }
}

public class Test_0803 {
    public static void main1(String[] args) {
        People people1 = new People();
        people1.name = "zhangsan";
        System.out.println(people1.name);
        people1.age = 18;
        System.out.println(people1.age);
        people1.height = 120.5f;
        System.out.println(people1.height);
        people1.tell = "1843977391";
        System.out.println(people1.tell);
        people1.add = "贵州省铜仁市";
        people1.ability(people1.age);

        System.out.println(people1.add);
        People people2 = new People();
        people2.name = "lisi";
        System.out.println(people2.name);
        people2.age = 20;
        System.out.println(people2.age);
        people2.height = 110.5f;
        System.out.println(people2.height);
        people2.tell = "15286443806";
        System.out.println(people2.tell);
        people2.add = "四川省泸州市";
        System.out.println(people2.add);
        people2.ability(people2.age);
    }

    public static void main(String[] args) {
        student p1 = new student();
        p1.setmassage("zhangsan",18,180.5f,120.5f);
        p1.print();
        String s;
        //System.out.println(s);

    }

}
class student{
      String name;
      int age;
      float height;
      float weight;

      public void setmassage(String name,int age,float height,float weight){
          this.name = name;
          this.age = age;
          this.height = height;
          this.weight = weight;
      }
      public void print(){
          System.out.println("年龄："+age+" 姓名："+name);
      }
}